import Vue from 'vue'
import VueRouter from 'vue-router'

import App from "../App";
import Setrule from "../views/Setrule";
import Createrule from "../views/Createrule";
import Index from "../views/Index";
import Displayrule from "../views/Displayrule"
import Updaterule from "../views/Updaterule"
import Login from "../views/Login"
import OrderDispatch from "../views/OrderDispatch";
import OrderQuery from "../views/OrderQuery";
import  Jobmenu from "../views/Jobmenu"

Vue.use(VueRouter)

  const routes = [

      /*-----------------------------------------以下是登陆及调度配置模块-----黄笠煌----------------------------------- */
      {
      path:"/",
      name:"登陆",
      component:Login,
      show:false
    },


    {
      path:"/Setrule",
      name:"调度订单配置",
      component:Index,
      show:true,
      //调度条件模块子项
      children:[
        {
          path:"/Createrule",
          name:"新增配置条件",
          component:Createrule
        },
        {
          path:"/Displayrule",
          name:"查询配置条件",
          component:Displayrule
        },

      ]
    },

    {
      path:"/Updaterule",
      component:Updaterule,
      show:false
    },
    /*--------------------------------------------以上是登陆及调度配置模块-----黄笠煌 -------------------------------------*/

    /*-------------------------------------以下是订单调度模块----刘猛----------------------------------------------------*/
    {
      path:"/diaodu",
      name:"调度作业",
      component:Index,
      show:true,
      children:[
        {
          path:"/orderDispatch",
          name:"订单调度",
          component:OrderDispatch
        },
        {
          path: "/orderQuery",
          name:"订单查询",
          component:OrderQuery
        }
      ]
    },
    /*-------------------------------------------以上是订单调度模块----刘猛--------------------------------------------------*/

    /*-------------------------------------以下是权限管理模块----焦子鉴----------------------------------------------------*/
    {
      path:"/Rightadmin",
      name:"权限管理",
      component:Index,
      show:true,
      children:[
        {
          path:"/Jobmenu",
          name:"岗位查询",
          component:Jobmenu
        }
      ]
    },
    /*-------------------------------------以上是权限管理模块----焦子鉴----------------------------------------------------*/
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
